#[[
Copyright (c) HiSilicon Technologies Co., Ltd. 2021-2021. All rights reserved.
Description: Build openssl 1.1.1g
Author: HiSilicon
Create: 2021-03-11
]]

set(MODULE_NAME openssl-1.1.1n)
add_custom_command(
    OUTPUT  ${LIBRARY_OUTPUT_PATH}/libssl-3-x64.dll ${LIBRARY_OUTPUT_PATH}/libcrypto-3-x64.dll
    COMMAND ./Configure mingw64 shared no-asm  --cross-compile-prefix=x86_64-w64-mingw32-
    COMMAND make build_libs
    COMMAND cp libssl-3-x64.dll libcrypto-3-x64.dll ${LIBRARY_OUTPUT_PATH}
    COMMENT "Building openssl 1.1.1n ..."
    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)


add_custom_target( ${MODULE_NAME} ALL DEPENDS ${LIBRARY_OUTPUT_PATH}/libssl-3-x64.dll ${LIBRARY_OUTPUT_PATH}/libcrypto-3-x64.dll )
